-- GENERATED SPELL FOR [Ikan] --


function spell0_16799(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(20831,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16799', 3000, 1)
end

function spell1_16799(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(20824,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16799', 3000, 1)
end

function spell2_16799(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(11436,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16799', 10000, 1)
end

function Sorts_16799(pUnit, Event)
local choix_sorts_16799 = math.random(0, 2)
if choix_sorts_16799 == 0 then
pUnit:RegisterEvent('spell0_16799', 1, 1)
end
if choix_sorts_16799 == 1 then
pUnit:RegisterEvent('spell1_16799', 1, 1)
end
if choix_sorts_16799 == 2 then
pUnit:RegisterEvent('spell2_16799', 1, 1)
end
end

function mob16799_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16799', math.random(1500, 3000), 1)
end

function mob16799_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16799_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16799_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16799, 1, 'mob16799_Action')
RegisterUnitEvent(16799, 2, 'mob16799_Leave')
RegisterUnitEvent(16799, 3, 'mob16799_Kill')
RegisterUnitEvent(16799, 4, 'mob16799_Die')
